@use "sass:color";

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.landing {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(147, 197, 253, 0.18) 0%, rgba(147, 197, 253, 0) 60%),
    linear-gradient(180deg, #f8fafc 0%, #f5f6f7 100%);
  color: #1f2d3d;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 10;
}

.brand {
  font-size: 14px;
  letter-spacing: 2px;
  color: rgba(31, 45, 61, 0.74);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(31,45,61,.08);
  box-shadow: 0 2px 6px rgba(31,45,61,.06), inset 0 1px 0 rgba(255,255,255,.6);
}

.login {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
  padding: 8px 18px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 42%),
    linear-gradient(135deg, #2a7bff 0%, #1f74ff 48%, #5aa3ff 100%);
  border: 1px solid rgba(31, 116, 255, .35);
  box-shadow:
    0 6px 16px rgba(31, 116, 255, .28),
    inset 0 1px 0 rgba(255,255,255,.35);
  backdrop-filter: saturate(120%) blur(2px);
  -webkit-backdrop-filter: saturate(120%) blur(2px);
  transition: transform .18s ease, box-shadow .18s ease, background .3s ease, border-color .2s ease;
}
.login:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 26px rgba(31, 116, 255, .34),
    0 0 0 3px rgba(90, 163, 255, .25),
    inset 0 1px 0 rgba(255,255,255,.4);
  border-color: rgba(31, 116, 255, .48);
}
.login:active {
  transform: translateY(0);
  box-shadow:
    0 6px 16px rgba(31, 116, 255, .28),
    inset 0 2px 6px rgba(0,0,0,.1);
}
.login:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(90, 163, 255, .35),
    0 10px 26px rgba(31, 116, 255, .34),
    inset 0 1px 0 rgba(255,255,255,.4);
}
@media (prefers-reduced-motion: reduce) {
  .login {
    transition: none;
  }
}

.hero {
  position: relative;
  width: 100%;
  height: 56vh;
  background-size: cover;
  background-position: center;
  border-bottom: 8px solid #efefef;
}

.heroMask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2), rgba(0,0,0,0.45));
}

.heroText {
  position: absolute;
  left: 16px;
  bottom: 18px;
  color: #fff;
}

.heroTitle {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.heroSub {
  margin-top: 6px;
  font-size: 12px;
  opacity: .9;
  letter-spacing: 1px;
  /* align with the start of the title text (logo 28px + gap 8px) */
  margin-left: 36px;
}

/* logo before the title */
.heroLogo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: inline-block;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.2));
  border-radius: 4px;
  background: transparent;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 36vh;
  gap: 14px;
  padding: 14px;
}

.card {
  position: relative;
  padding: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(31, 45, 61, 0.08);
  border: 1px solid rgba(31, 45, 61, 0.06);
  transition: transform .2s ease, box-shadow .2s ease, background .3s ease, border-color .2s ease;
  backdrop-filter: saturate(110%) blur(2px);
  outline: none;
}

/* shared decorative soft glow */
.card::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(60% 50% at 80% 0%, rgba(255,255,255,.6) 0%, rgba(255,255,255,0) 60%),
              radial-gradient(40% 35% at 0% 100%, color.adjust(#ffffff, $alpha: -0.6) 0%, transparent 70%);
  pointer-events: none;
}

.cardTitle {
  position: absolute;
  top: 14px;
  right: 12px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(31, 45, 61, 0.78);
  transition: color .2s ease, text-shadow .2s ease;
}

.cardIcon {
  position: absolute;
  left: 14px;
  bottom: 14px;
  opacity: .35;
  transition: transform .2s ease, opacity .2s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.06));
  color: var(--accent, #1F2D3D);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(31, 45, 61, 0.12);
}

.card:focus-visible {
  box-shadow:
    0 0 0 3px rgba(90, 163, 255, .35),
    0 10px 24px rgba(31, 45, 61, 0.12);
}

.card:hover .cardIcon {
  transform: translateY(-1px);
  opacity: .42;
}

.card:hover .cardTitle {
  color: rgba(31, 45, 61, 0.9);
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}

/* Premium education-themed palettes */
.c1 {
  /* 课程资源库 · 学院蓝 */
  --accent: #1e3a8a; /* indigo-900 */
  --accent-weak: #93c5fd; /* blue-300 */
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(147,197,253,.28) 0%, rgba(147,197,253,0) 60%),
    linear-gradient(135deg, #ffffff 0%, #f6f9ff 52%, #eef4ff 100%);
  border-color: color.change(#1e3a8a, $alpha: .14);
  background-size: 200% 200%;
  animation: gradientShift 18s ease infinite;
}
.c1:hover {
  box-shadow:
    0 10px 24px rgba(30,58,138,.16),
    0 0 0 1px color.change(#1e3a8a, $alpha:.22) inset;
  border-color: color.change(#1e3a8a, $alpha:.2);
}
.c1 .cardTitle {
  color: color.change(#1e3a8a, $alpha: .78);
}

.c2 {
  /* 教师专业支持 · 育林绿 */
  --accent: #065f46; /* emerald-900 */
  --accent-weak: #a7f3d0; /* emerald-200 */
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(167,243,208,.26) 0%, rgba(167,243,208,0) 60%),
    linear-gradient(135deg, #ffffff 0%, #f5fffb 52%, #ecfbf5 100%);
  border-color: color.change(#065f46, $alpha: .14);
  background-size: 200% 200%;
  animation: gradientShift 19s ease-in-out infinite;
}
.c2:hover {
  box-shadow:
    0 10px 24px rgba(6,95,70,.16),
    0 0 0 1px color.change(#065f46, $alpha:.22) inset;
  border-color: color.change(#065f46, $alpha:.2);
}
.c2 .cardTitle {
  color: color.change(#065f46, $alpha: .8);
}

.c3 {
  /* 家园共育资源库 · 晨曦玫瑰 */
  --accent: #9d174d; /* rose-900 */
  --accent-weak: #fbcfe8; /* pink-200 */
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(251,207,232,.28) 0%, rgba(251,207,232,0) 60%),
    linear-gradient(135deg, #ffffff 0%, #fff7fb 50%, #fff0f6 100%);
  border-color: color.change(#9d174d, $alpha: .14);
  background-size: 200% 200%;
  animation: gradientShift 17s ease infinite;
}
.c3:hover {
  box-shadow:
    0 10px 24px rgba(157,23,77,.16),
    0 0 0 1px color.change(#9d174d, $alpha:.22) inset;
  border-color: color.change(#9d174d, $alpha:.2);
}
.c3 .cardTitle {
  color: color.change(#9d174d, $alpha: .8);
}

.c4 {
  /* 儿童发展平台 · 雅致琥金 */
  --accent: #92400e; /* amber-900 */
  --accent-weak: #fde68a; /* amber-200 */
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(253,230,138,.3) 0%, rgba(253,230,138,0) 60%),
    linear-gradient(135deg, #ffffff 0%, #fffaf2 50%, #fff4e6 100%);
  border-color: color.change(#92400e, $alpha: .14);
  background-size: 200% 200%;
  animation: gradientShift 20s ease-in-out infinite;
}
.c4:hover {
  box-shadow:
    0 10px 24px rgba(146,64,14,.16),
    0 0 0 1px color.change(#92400e, $alpha:.22) inset;
  border-color: color.change(#92400e, $alpha:.2);
}
.c4 .cardTitle {
  color: color.change(#92400e, $alpha: .82);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 10px;
  background: #1f74ff;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
}

.btnOutline {
  background: transparent;
  color: #1f74ff;
  border: 1px solid #1f74ff;
}

@media (max-width: 720px) {
  .hero {
    height: 44vh;
  }
  .grid {
    grid-auto-rows: 34vh;
    gap: 12px;
    padding: 12px;
  }
  .cardTitle {
    right: 10px;
    font-size: 15px;
    letter-spacing: 1.5px;
  }
}


